package com.ds.lens.data.common.document.dto;

import com.ds.lens.data.common.constant.AggregatorEnum;
import com.ds.lens.data.common.constant.CompareOperatorEnum;
import com.ds.lens.data.common.constant.EventSourceEnum;
import com.ds.lens.data.common.constant.EventStateEnum;
import com.ds.lens.data.common.document.Notify;
import com.ds.lens.data.common.document.Triggered;
import com.ds.lens.data.common.document.dynamic.DynamicSinkBO;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Builder
@Getter
@Setter
public class MonitorEvent implements Serializable {
    private static final long serialVersionUID = -4619275276135500207L;
    private String uid;
    private Integer detectionMethod;
    private String monitorName;
    private MonitorKey monitorKey;
    private Long monitorCreateTime;
    private String metricName;
    private AggregatorEnum aggrEnum;
    private CompareOperatorEnum operatorEnum;
    private Map<String, Object> groupBys;
    private Double threshold;
    private EventStateEnum state;
    private List<String> tags;
    private String expression;
    private Triggered triggered;
    private Notify notify;
    private Long timeStamp;

    private Long interval;
    private Long queryDelayTime;
    private Long retriveDuration;
    private Integer metricAggr;
    /**
     * 暂时保存
     * APM的业务域appId/appName/tierId/tierName
     */
    private Map<String, Object> scope;
    private Long integrationId;
    private Map<String, Object> metricFilter;
    private List<String> metricBy;
    /**
     * applicationId
     */
    private Long appId;
    private String appName;

    private Long queryStartTime;
    private Long queryEndTime;
    private Map<String, Object> levelThresholdMap;

    private EventSourceEnum eventSourceEnum;

    private Boolean isNotify;

    private Boolean isEvent;
    private DynamicSinkBO dynamicSinkBO;

}
